package com.itxiuyixiu.security.mapper;

import com.itxiuyixiu.entity.model.Admin;
import com.itxiuyixiu.entity.model.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author 黄磊
 * @date 2020/5/1
 */
@Mapper
public interface UserMapper {
    @Select("select * from User where username=#{username}")
    User findUserByUsername(String username);

    @Insert("insert into User(username , password , authorities , nickName) values(#{username}, #{password},#{authorities}, #{nickName})")
    void insertUser(User user);
}
